<%@page import="java.util.HashMap"%>
<%@page import="java.util.*"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<%@include file="../header.jsp"%>



<%
	HashMap data = (HashMap)request.getAttribute("NBoard");
%>

	<div id="sub_img">
		<img src="<%=path%>/images/hi_img.jpg" width="1000" height="372" alt="">
	</div>

	<div id="scontents">
		<script type="text/javascript">initNavigation('7');</script>
		<script language="JavaScript">
	function MailTo(no){
		hiddenframe.document.location.href = 'http://h-ps011u.monowebs.co.kr/board/index.php?mode=MailTo&board=noticeboard&no='+no;
	}
</script>
		
		<h2 id="sub_title">
			<span class="Etitle">NOTICE</span><span class="ktitle">공지사항</span>
		</h2>
		
		<script language="JavaScript">
	function DeleteConfirm() {
		var member = '';
		question = (member) ? confirm('정말 삭제하시겠습니까?'): true;
		if(question) {
			document.location.href = "/board/index.php?board=noticeboard&mode=pass&no=24&what=delete";
		} else return;
	}
		</script>

		<div id="notice">
			<div id="board_view">
				<!-- VIEW 테이블 시작 -->
				<table cellpadding="0" cellspacing="0" border="0" width="100%"
					class="view_table" summary="">
					<colgroup>
						<col width="15%">
						<col width="35%">
						<col width="15%">
						<col width="35%">
					</colgroup>
					<tbody>
					<c:set var="detail" value="${rboard}"/>
						<tr>
							<th scope="row">제&nbsp;&nbsp;목</th>
							<td colspan="3" class="title"><%-- <%=data.get("NB_TITLE").toString()%> --%>
							${detail.NB_TITLE}</td>
						</tr>
						<tr>
							<th scope="row">글&nbsp;쓴&nbsp;이</th>
							<td class="Rline">${detail.NB_NAME}</td>   <!--펜션지기 -->
							<th scope="row">등&nbsp;록&nbsp;일</th>
							<td>${detail.NB_DATE}</td>
						</tr>
						<tr>
							<td colspan="4" class="textual"><p>${detail.NB_TEXT}</p></td>
						</tr>
					</tbody>
				</table>
				<!-- VIEW 테이블 끝 -->
			</div>
			
			
			<div class="btn_submit2" style="display:inline; float:right;" onclick="javascript:location.href='<%=path%>/deleteBoard.admin?nb_no=${detail.NB_NO}'">
			<!-- <input type="button" name="submit" value="취소" /> -->
			삭제
			</div>
			<div class="btn_submit2" style="display:inline; float:right;" onclick="javascript:location.href='<%=path%>/BoardUpdateGet.admin?nb_no=${detail.NB_NO}'">
			수정
			</div>
			<div class="btn_submit2" style="display:inline; float:right; border-left:1px solid #7b7a6e;" onclick="javascript:location.href='<%=path%>/boardAdmin.admin'">
			목록
			</div>
			
			<br><br><br><br>
			
			
	<script language="JavaScript">
	var RippleAuth = "";
	function FieldCheckRipple(field, msg) {
		if(!field.value) {
			alert(msg);
			field.focus();
			return true;
		}
		return false;
	}

	function RippleSubmit() {
		form = document.ripple;

/* 		if(!RippleAuth) {
			alert('리플쓰기 권한이 없습니다.');
			return false;
		}

		if(FieldCheckRipple(form.ripple_name, "이름을 기재해 주세요.")) return false;
		
		if(FieldCheckRipple(form.ripple_pass, "비밀번호를 기재해 주세요.")) return false;
		if(!IsRipplePW(form.ripple_pass)) {
			alert('비밀번호는 4~12자의 영문 또는 숫자로 조합된 문자열이어야 합니다.');
			form.ripple_pass.focus();
			form.ripple_pass.select();
			return false;
		}
		
		if(FieldCheckRipple(form.ripple_content, "내용을 기재해 주세요.")) return false;
		
		if(FieldCheckRipple(form.antiad_key, "인증번호를 기재해 주세요.")) return false; */
		
		return true;
	}

	function FormRippleSubmit() {
		if(RippleSubmit()) document.ripple.submit();
		else return;
	}

	function IsRipplePW(form) {
		if(form.value.length<4 || form.value.length >13) {
			return false;
		}
		for(var i=0; i<form.value.length; i++) {
			var chr=form.value.substr(i,1);
			if((chr<'0' || chr > '9') && (chr <'a' || chr >'z') && (chr <'A' || chr >'Z')) {
				return false;
			}
		}
		return true;
	}

	function RippleDelConfirm(no) {
		
		
		document.location.href = "http://h-ps011u.monowebs.co.kr/board/index.php?board=noticeboard&mode=pass&no=24&rno="+no+"&what=ripple";
		
	}
</script>

<!-- 	/* Start--------------------------------------------------------------------------------*/ -->

			<div id="comment_list">
				<!-- COMMENT 테이블 시작 -->
				<table cellpadding="0" cellspacing="0" border="0" width="100%"
					class="comment_Vtable" summary="">
					<colgroup>
						<col width="15%">
						<col width="70%">
						<col width="15%">
					</colgroup>
					<%
					List<HashMap> list = (List<HashMap>)request.getAttribute("rippledetail");
					
					if(list.isEmpty()){
					%>
					<thead>
					<tr>
					<th>댓글이 없습니다.</th>
					</tr>
					</thead>
					<%
					}else {
					%>
					<thead>
					<tr>
					<th>이름</th>
					<th>내용</th>
					<th>작성일</th>
					</tr>
					</thead>
					<% } %>
					<tbody>
						<c:forEach var="ripple" items="${rippledetail}">
							<tr>
								<td>${ripple.RIPPLE_NAME}</td>
								<td>${ripple.RIPPLE_CONTENT}</td>						
								<td>${ripple.RIPPLE_DATE}</td>
							</tr>
						</c:forEach>
					</tbody>
				</table>
				<!-- COMMENT 테이블 끝 -->
			</div>

<div>
<form method="post" name="ripple" action="<%=path%>/NboardCmInsert.admin" onsubmit="return RippleSubmit()">
			<div id="comment_write">
				<div class="comW_title">댓글쓰기</div>
				<table cellpadding="0" cellspacing="0" border="0" width="100%" class="comment_Wtable" summary=""
				style="padding-left: 180px;padding-top: 20px;">
					<colgroup>
						<col width="711px">
						<col width="100px">
					</colgroup>
					<tbody>
						<tr>
							<td colspan="2">
							<input type="hidden" name="ripple_del" value="n">
							<input type="hidden" name="ripple_subid" value="${detail.NB_NO}">
							<input type="hidden" name="nb_no" value="${detail.NB_NO}"> 
							<strong>글쓴이</strong>&nbsp;&nbsp;				
							<input type="text" maxlength="10" name="ripple_name">&nbsp;&nbsp;&nbsp;&nbsp;
							<strong style="margin-left: 139px;">비밀번호</strong>&nbsp;&nbsp;
							<input type="password" maxlength="10" name="ripple_pass">
							</td>
						</tr>

						<tr>
						
							<td>
								<textarea name="ripple_content" cols="110" rows="4"></textarea>
							</td>
							
							<td style="padding: 50px 210px 0px 10px;">	
								<a href="javascript:FormRippleSubmit()">
									<img class="btn_save" src="http://h-ps011u.monowebs.co.kr/skin/board/basic_list/image/btn_board_save.gif" width="59" height="21" alt="글등록">
								</a>
							</td>
							
						</tr>

<!-- 						<tr>
							<td colspan="2"><strong>인증코드</strong>&nbsp;&nbsp;<input
								type="text" maxlength="4" name="antiad_key" class="input80">
								[<span class="font_redB">2</span><span class="font_redB">8</span>0<span
								class="font_redB">0</span>05<span class="font_redB">c</span>3] <span
								class="font_red">빨간색 글자</span>만 입력하세요.</td>
						</tr> -->
					</tbody>
				</table>
			</div> 
</form>
	<!-- /* End----------------------------------------------------------------------------------*/ -->

</div>			
			
	<script language="javascript">
	var DefaultURL = 'http://h-ps011u.monowebs.co.kr/board/index.php?board=noticeboard&key=&keyfield=';
	function change_sort(how, is_sort) {
		how += (is_sort) ? "_a": "_d";
		document.location.href = DefaultURL+'&category=&reply=&sort=' + how;
	}	
	</script>
	
			<br>

	<div id="board_list">
				<table cellpadding="0" cellspacing="0" border="0" width="100%" summary="" class="li_bg1">
					<colgroup>
						<col width="5%">
						<col width="5%">
						<col width="30%">
						<col width="7%">
						<col width="10%">
						<col width="6%">
					</colgroup>
					<thead>
						<tr>
							<th scope="col">구분</th>
							<th scope="col">No</th>
							<th scope="col">제목</th>
							<th scope="col">글쓴이</th>
							<th scope="col">등록일</th>
							<th scope="col" class="borderRno">조회</th>
						</tr>
					</thead>
					
					<tbody>
					<%
					HashMap back = (HashMap)request.getAttribute("backList");
					if(back != null){ %>
					<c:set var="back" value="${backList}"/>
						<tr class="li_bg1" onclick="location.href='<%=path%>/NBoardDetail.NBoard?NB_no=${back.NB_NO}&ripple_subid=${back.NB_NO}'">
							<td>이전글</td>
							<td>${back.NB_NO}</td>
							<td class="board_title boardlist_title">
							${back.NB_TITLE}</td>
							<td>${back.NB_NAME}</td>
							<td>${back.NB_DATE}</td>
							<td>${back.NB_HIT}</td>
						</tr>
					<% } %>
					
					<%
					HashMap next = (HashMap)request.getAttribute("nextList");
					if(next != null){
					%>
					<c:set var="next" value="${nextList}"/>
						<tr class="li_bg1" onclick="location.href='<%=path%>/NBoardDetail.NBoard?NB_no=${next.NB_NO}&ripple_subid=${next.NB_NO}'">
							<td>다음글</td>
							<td>${next.NB_NO}</td>
							<td class="board_title boardlist_title">
							${next.NB_TITLE}</td>
							<td>${next.NB_NAME}</td>
							<td>${next.NB_DATE}</td>
							<td>${next.NB_HIT}</td>
						</tr>
					<% } %>
					</tbody>

				</table>
	</div>
		
		</div>
		﻿
		</div>


<%@include file="../footer.jsp"%>